# 目标模块名称
obj-m += pcie_cdev_ad.o

# 交叉编译工具链
# CROSS_COMPILE ?= /media/test/sde/ubuntu2204/TL3588-DEBIAN/rk3588_linux_release_v1.2.1/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
CROSS_COMPILE ?= /media/test/sde/ubuntu2204/TL3568F-AMP/rk356x_linux_release_v1.3.1/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-

# 目标架构
ARCH ?= arm64

# 目标内核源码路径
# KERNEL_DIR ?= /media/test/sde/ubuntu2204/TL3588-DEBIAN/rk3588_linux_release_v1.2.1/kernel
KERNEL_DIR ?= /media/test/sde/ubuntu2204/TL3568F-AMP/rk356x_linux_release_v1.3.1/kernel

# 编译选项
EXTRA_CFLAGS += -Wall

all:
	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL_DIR) M=$(PWD) modules

clean:
	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL_DIR) M=$(PWD) clean
